<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>

        window.onload = function () {
            setInterval(run,1000)
            let time = document.getElementById("time");

            function run() {
                let a = new Date();
                let H = a.getHours();
                let m = a.getMinutes();
                let s = a.getSeconds();
                time.innerHTML = H+":"+m+":"+s
            }

        }

    </script>
</head>
<body>
<div id="time">

</div>
</body>
</html>